package com.basic.business.log.service.impl;

import com.basic.business.log.domain.TOrdersLog;
import com.basic.business.log.mapper.ITOrdersLogMapper;
import com.basic.business.log.service.ITOrdersLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 日志表服务实现类
 *
 * @author zhaoxy_jn@163.com
 */
@Service
public class TOrdersLogServiceImpl implements ITOrdersLogService {

    @Resource
    private ITOrdersLogMapper tOrdersLogMapper;

    @Override
    public void insert(long mainSid, long sid, String content, long created) {
        tOrdersLogMapper.insert(new TOrdersLog(mainSid, sid, content, created));
    }

    @Override
    public void insertPath(long mainSid, long sid, String content, String path) {
        tOrdersLogMapper.insert(new TOrdersLog(mainSid, sid, content, path));
    }

    @Override
    public List<TOrdersLog> getFilePathBySid(long sid) {
        return tOrdersLogMapper.getFilePathBySid(sid);
    }

    @Override
    public List<TOrdersLog> getFilePathByMainSid(long mainSid) {
        return tOrdersLogMapper.getFilePathByMainSid(mainSid);
    }

    @Override
    public List<TOrdersLog> getFileDirectory(long mainSid, String noFilePath) {
        return tOrdersLogMapper.getFileDirectory(mainSid, noFilePath);
    }

    @Override
    public void updatePath(String id, String filePath, String fileC) {
        tOrdersLogMapper.updatePath(id, filePath, fileC);
    }

    @Override
    public void updateStatus(String id, char c) {
        tOrdersLogMapper.updateStatus(id, c);
    }


}
